package com.pan.graph.xy;

import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Supplier;

public class RectangleXY extends graphXY{

    private AtomicInteger rectangleX ;
    private AtomicInteger rectangleY;

    public RectangleXY(Supplier<Integer[]> parentXY) {
        super(parentXY);
        rectangleX = new AtomicInteger(super.x.get() + 200);
        rectangleY = new AtomicInteger(super.y.get() + 300);
    }

    public RectangleXY() {
        super();
        rectangleX = new AtomicInteger(super.x.get() + 200);
        rectangleY = new AtomicInteger(super.y.get() + 300);

    }

    public Integer[] getRectangleXY() {
        return new Integer[]{rectangleX.get(),rectangleY.get()};
    }

}
